package com.ficus.road.maintain.core.model.taskInfo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author lijiawei
 * @date 2023/10/10 下午3:55
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TaskInfoDetail {

    public static final String rejectedDesc = "退单申请";

    public static final String completedDesc = "结案申请";

    private String createby;
    private String createdpartid;

    private String cdzxpictures;

    private String codedesc;

    private String eventpictures;

    // 退单原因
    private String advice;

    //        @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    @JsonDeserialize(using = ZhongHaiDateDeserializer.class)
    private LocalDateTime createdate;

    private String glspictures;

    public boolean isRejectInfo() {
        return this.codedesc.equals(rejectedDesc);
    }


    public boolean isCompleted() {
        return this.codedesc.equals(completedDesc);
    }
}
